home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ADA Programming Guide
/
ADA Programming Guide.iso
/
ada_gnu
/
adainc
/
s-tatise.ads
< prev
next >
Wrap
Text File
|
1996-01-30
|
3KB
|
70 lines
------------------------------------------------------------------------------
-- --
-- GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . T A S K _ T I M E R _ S E R V I C E --
-- --
-- S p e c --
-- --
-- $Revision: 1.9 $ --
-- --
-- Copyright (c) 1991,1992,1993,1994, FSU, All Rights Reserved --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU Library General Public License as published by the --
-- Free Software Foundation; either version 2, or (at your option) any --
-- later version. GNARL is distributed in the hope that it will be use- --
-- ful, but but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Gen- --
-- eral Library Public License for more details. You should have received --
-- a copy of the GNU Library General Public License along with GNARL; see --
-- file COPYING.LIB. If not, write to the Free Software Foundation, 675 --
-- Mass Ave, Cambridge, MA 02139, USA. --
-- --
------------------------------------------------------------------------------
-- Server to manage delays. Written in terms of System.Real_Time.Time
-- and System.Task_Clock.Time.
with Ada.Calendar;
-- Used for, Calendar.Time
with Ada.Real_Time;
-- Used for, Real_Time.Time
-- Real_Time.Time_Span
with System.Task_Clock;
-- Used for, Stimespec
with System.Tasking;
-- Used for, Protection
package System.Task_Timer_Service is
-- Implementing a proteced type using a single package
protected type Signal_Object is
pragma Priority (Priority'Last);
entry Wait;
procedure Signal;
function Wait_Count return Integer;
private
Open : Boolean := False;
end Signal_Object;
protected Timer is
pragma Priority (Priority'Last);
procedure Service (T : out System.Task_Clock.Stimespec);
entry Enqueue_Time_Span (T : in Real_Time.Time_Span);
entry Enqueue_Duration (T : in Duration);
entry Enqueue_Real_Time (T : in Real_Time.Time);
entry Enqueue_Calendar_Time (T : in Ada.Calendar.Time);
-- private
-- procedure Time_Enqueue
-- (T : in Task_Clock.Stimespec;
-- N : in out Q_Link);
-- ??? Private operations don't work.
end Timer;
end System.Task_Timer_Service;